package com.example.onlinemarket.bean;

import java.util.Objects;

public class SearchItem {
    private String searchSelect;
    private String species;
    private String searchContent;

    public SearchItem(String searchSelect, String species, String searchContent) {
        this.searchSelect = searchSelect;
        this.species = species;
        this.searchContent = searchContent;
    }

    public SearchItem(String searchSelect, String species) {
        this.searchSelect = searchSelect;
        this.species = species;
        this.searchContent="";
    }

    public SearchItem() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SearchItem that = (SearchItem) o;
        return Objects.equals(searchSelect, that.searchSelect) && Objects.equals(species, that.species) && Objects.equals(searchContent, that.searchContent);
    }

    @Override
    public int hashCode() {
        return Objects.hash(searchSelect, species, searchContent);
    }

    @Override
    public String toString() {
        return "SearchItem{" +
                "searchSelect='" + searchSelect + '\'' +
                ", species='" + species + '\'' +
                ", searchContent='" + searchContent + '\'' +
                '}';
    }

    public String getSearchSelect() {
        return searchSelect;
    }

    public void setSearchSelect(String searchSelect) {
        this.searchSelect = searchSelect;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public String getSearchContent() {
        return searchContent;
    }

    public void setSearchContent(String searchContent) {
        this.searchContent = searchContent;
    }
}
